//
//  NewsChannelsView.h
//  NewsChannal
//
//  Created by chinabyte on 2017/7/18.
//  Copyright © 2017年 chinabyte. All rights reserved.
//

#import <UIKit/UIKit.h>
@class NewsChannelsView;
@protocol NewsChannelsViewDelegate <NSObject>
@optional
//选中某一个频新闻道
- (void)NewsChannelsView:(NewsChannelsView *)newsChannelsView didSelectedNewsChannelItemAtIndex:(NSInteger)index;
//添加新闻频道的加号按钮
- (void)NewsChannelsView:(NewsChannelsView *)newsChannelsView didSelectedAddNewsChannelButton:(BOOL)selected;
@end

@interface NewsChannelsView : UIView
//频道数组
@property (nonatomic, retain) NSArray *newsChannels;
//选中分类，默认为0
@property (nonatomic,assign) NSInteger currentIndex;
// 代理
@property (nonatomic, weak) id<NewsChannelsViewDelegate> ttDelegate;

+ (instancetype)newsChannelsView;
- (void)scrollerToCenterWithIndex:(NSInteger)index;
- (void)transformStatusWithCurrentIndex:(NSInteger)currentIndex nextIndex:(NSInteger)nextIndex withRate:(CGFloat)rate;
// 选中某一个频新闻道
- (void)selectNewsChannelsItemWithIndex:(NSInteger)index;
@end
